import CartProInfoExpire  from './CartProInfoExpire'

export default class CartProItemExpire extends React.Component{
    render(){
        const {item,products,suppId}=this.props
        const {cart,supplier,suppName}=item
        return(
            <div
                className={'cart-expire-item'}>
                <div className={'cart-expire-item-comp'}>
                    <p dangerouslySetInnerHTML={{__html: global.hasLogin ? supplier.name  : suppName}}></p>
                </div>
                <div className={'cart-expire-item-content-wrapper'}>
                    {
                        products.map((product,index)=>(
                            <CartProInfoExpire
                                suppId={suppId}
                                key={index}
                                index={index}
                                info={product}
                            />
                        ))
                    }

                </div>
            </div>
        )
    }
}